import React, { Component } from 'react'
import { Switch, Route, Redirect} from 'react-router-dom'
import Home from './Home';
import About from './About';
import Detail from './Detail';

import Tabbar from './components/Tabbar';
export default class App extends Component {
  render() {
    return (
      <div>
       <header>
         <Tabbar></Tabbar>
       </header>
        <Switch>
          <Route path="/home" component={Home}></Route>
          <Route path="/about" component={About}></Route>
        
          <Route path="/detail/:name" component={Detail}></Route>
          <Redirect from="/" to="/home"></Redirect>
        </Switch>

      </div>
    )
  }
}
